<?php
/**
 *
 * @author Kov�cs Tam�s
 * @version
 */
require_once 'Zend/Loader/PluginLoader.php';
require_once 'Zend/Controller/Action/Helper/Abstract.php';

/**
 * Navigation Action Helper
 *
 * @uses actionHelper Smithy_Controller_Action_Helper
 */
class Smithy_Controller_Action_Helper_Navigation extends Zend_Controller_Action_Helper_Abstract
{
    /**
     * @var Zend_Loader_PluginLoader
     */
    public $pluginLoader;


    /**
     * Constructor: initialize plugin loader
     *
     * @return void
     */
    public function __construct ()
    {
        $this->pluginLoader = new Zend_Loader_PluginLoader();
    }

    /**
     * Returns the navigation bar instance
     *
     * @return Smithy_Navigation
     */
    public function getNavigationInstance()
    {
        return Smithy_Navigation::getInstance();
    }

    /**
     * Rendering navigation bar.
     *
     * @return void
     */
    public function postDispatch()
    {
        $this->getActionController()->view->placeholder('nav')->set(
            $this->getNavigationInstance()->render()
        );
    }

    /**
     * Strategy pattern: call helper as broker method
     */
    public function direct ()
    {    // TODO Auto-generated 'direct' method
    }
}

